/*
 * ReceiverEvent.java
 *
 * Created on 23 mai 2006, 10:07
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package courselog.gpsutils;

import ewe.ui.Event;

/**
 * Specific Event dispatched when the GPS receiver provides new data or status.
 * Also used by the PositionTracer when the trace state is modified.
 * @author C. Rigal
 */
public class ReceiverEvent extends Event {
    
    /**
     * Indicates a new point is available.
     */
    public static int NEWPOINT=0;
    /**
     * indicates a tracer is updated.
     */
    public static int NEWTRACELOG=1;
    /**
     * Indicates receiver status has changed.
     * @see SerialGPSConnection#status
     */
    public static int STATUSCHANGED=-1;
    
    /**
     * Creates a new instance of ReceiverEvent
     * @param evtTarget Target of the event (either GPS receiver or tracer).
     * @param evtType Type of event (see static constants).
     */
    public ReceiverEvent(Object evtTarget, int evtType) {
        this.target = evtTarget;
        this.type = evtType;
    }
    
    /** Creates a new instance of ReceiverEvent with empty values*/
    public ReceiverEvent() {
    }
}
